<?php
/**
 * Created by PhpStorm.
 * Script Name: MpTask.php
 * Create: 2023/2/28 18:08
 * Description:
 * Author: fudaoji<fdj@kuryun.cn>
 */

namespace plugin\wechat\app\service;


class MpTask extends Common
{

    const MODULE_PULL_FOLLOW  = 'pullfollow';
    const STATUS_WAIT = 0;
    const STATUS_RUNNING = 1;
    const STATUS_FINISH = 2;
    const STATUS_HALT = 3;

    static function modules($id = null){
        $list = [
            self::MODULE_PULL_FOLLOW => '拉取粉丝',
        ];
        return isset($list[$id]) ? $list[$id] : $list;
    }

    static function status($id = null){
        //0待发送 1执行中 2已完成 3 已终止
        $list = [
            self::STATUS_WAIT=>'待执行',
            self::STATUS_RUNNING => '执行中',
            self::STATUS_FINISH=>'已完成',
            self::STATUS_HALT => '终止',
        ];
        return isset($list[$id]) ? $list[$id] : $list;
    }
}